package com.google.p2pbench;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class AlarmReceiver extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {
    Log.w(MainActivity.TAG, "Alarm fired! " + intent.getExtras());
    Intent launch = new Intent(context, MainActivity.class);
    launch.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    launch.putExtras(intent.getExtras());
    context.startActivity(launch);
  }

}
